package de.hs.rm.UJAdapter.impl;

import java.util.Dictionary;
import java.util.Hashtable;

import javax.management.Attribute;

import org.osgi.service.upnp.UPnPStateVariable;

public class UJActionGetter extends UJAction {
	
	@Override
	public Dictionary invoke(Dictionary args) throws Exception {
		
		Dictionary returnValue = new Hashtable();
		
		Object result = mBeanServerConnection.getAttribute(objName
				, stateVariable.getName());
		returnValue.put(stateVariable.getName(), result);
		
		return returnValue;
	}
	
	@Override
	public UPnPStateVariable getStateVariable(String argumentName) {
		return stateVariable;
	}

}
